package com.atguigu.mapper.impl;

import com.atguigu.dao.MovieDao;
import com.atguigu.pojo.Movie;
import com.atguigu.mapper.MovieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 琉
 * @create 2021-09-06 18:12
 */
@Service
public class MovieServiceImpl implements MovieService {

    @Autowired
    private MovieDao movieDao;

    @Override
    public List<Movie> getAll() {
        return movieDao.getAll();
    }

    @Override
    public Movie getMovieById(String movieId) {
        return movieDao.getMovieById(movieId);
    }

    @Override
    public void saveMovie(Movie movie) {
         movieDao.saveMovie(movie);
    }

    @Override
    public void updateMovie(Movie movie) {
         movieDao.updateMovie(movie);
    }

    @Override
    public void removeMovieById(String movieId) {
         movieDao.removeMovieById(movieId);
    }
}
